#include "server.h"


int handle_gets(int net_fd, ClientInfo *client, const char* filename) {

    client->socket = net_fd;

    Message response;

    // TODO: 实现文件发送逻辑

    response.type = MSG_TYPE_SUCCESS;
    response.length = snprintf(response.data, sizeof(response.data), "文件 %s 下载成功", filename);

    if (send_message(client->socket, &response) < 0) {
        perror("发送gets响应失败");
        return -1;
    }

    return 0;
}
